<<<<<<< HEAD
<!DOCTYPE html>
<html lang="en">
<head>
    <meta charset="UTF-8">
    <meta http-equiv="X-UA-Compatible" content="IE=edge">
    <meta name="viewport" content="width=device-width, initial-scale=1.0">
    <title>Document</title>
</head>
<body>
    <form method="post" action="">
        语文: <input type="text" name="ch"> <br />
        数学：<input type="text" name="math"> <br />
    <input type="submit" name="button" value="判断成绩">
    </form>
</body>
</html>

<?php
if(isset($_POST['button']))
{
    $ch=$_POST['ch'];
    $math=$_POST['math'];
    $avg=($ch+$math)/2;
    if($avg>=90){
        echo 'a'."<br>";
        echo '你的平均成绩：'.$avg;
    }elseif($avg>=80){
        echo 'b'."<br>";
        echo '你的平均成绩：'.$avg;
    }elseif($avg>=70){
        echo 'c'."<br>";
        echo '你的平均成绩：'.$avg;
    }else{
        echo 'd'."<br>";
        echo '你的平均成绩：'.$avg;
    }
}

=======
<!DOCTYPE html>
<html lang="en">
<head>
    <meta charset="UTF-8">
    <meta http-equiv="X-UA-Compatible" content="IE=edge">
    <meta name="viewport" content="width=device-width, initial-scale=1.0">
    <title>Document</title>
</head>
<body>
    <form method="post" action="">
        语文: <input type="text" name="ch"> <br />
        数学：<input type="text" name="math"> <br />
    <input type="submit" name="button" value="判断成绩">
    </form>
</body>
</html>

<?php
if(isset($_POST['button']))
{
    $ch=$_POST['ch'];
    $math=$_POST['math'];
    $avg=($ch+$math)/2;
    if($avg>=90){
        echo 'a'."<br>";
        echo '你的平均成绩：'.$avg;
    }elseif($avg>=80){
        echo 'b'."<br>";
        echo '你的平均成绩：'.$avg;
    }elseif($avg>=70){
        echo 'c'."<br>";
        echo '你的平均成绩：'.$avg;
    }else{
        echo 'd'."<br>";
        echo '你的平均成绩：'.$avg;
    }
}

>>>>>>> 729bf69 (1)
?>